import { Component, OnInit } from '@angular/core';

declare var layui: any;

@Component({
  selector: 'app-hotel-picture',
  templateUrl: './hotel-picture.component.html',
  styleUrls: ['./hotel-picture.component.css'],
})
export class HotelPictureComponent implements OnInit {

  ngOnInit() {

    layui.use(['laydate', 'laypage', 'layer', 'table', 'carousel', 'upload', 'element', 'util'], function () {
      var $ = layui.jquery,
        laydate = layui.laydate //日期
        ,
        form = layui.form //表单
        ,
        laypage = layui.laypage //分页
        ,
        layer = layui.layer //弹层
        ,
        table = layui.table //表格
        ,
        carousel = layui.carousel //轮播
        ,
        upload = layui.upload //上传
        ,
        element = layui.element //元素操作
        ,
        util = layui.util; //回到顶部

      //图片轮播
      var carousel = layui.carousel;

      carousel.render({
        elem: '#pic',
        width: '100%', //设置容器宽度
        height: '660px',
        interval: 4000, //自动切换的时间间隔
        arrow: 'fade', //始终显示箭头
        indicator: 'inside'
      });

    });

  }
}
